Method and a Computer System for Providing a Route or a Route Duration for a Journey from a Source Location to a Target Location

ABSTRACT

Embodiments relate to producing a plan of a route in a transportation system. The method receives route requirements, including a starting and an ending locations. The method builds a model of the transportation system from data about vehicles. The model abstracts a “prospect travel” between two locations using any of a range of choices of vehicles and walks that can transport between the two locations. Given anticipated wait durations for the vehicles and their ride durations, the method determines an expected minimum travel duration using any of these choices. The method combines the expectations for various locations in a scalable manner. As a result, a route plan that achieves a shortest expected travel duration, and meets other requirements, is computed for one of the largest metropolitan areas in existence today. Other embodiments include a computer system and a product service that implement the method.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon, and claims the priority dates of,applications:

[Country] [Application Number] [Filing Date] USA 62/608,586 Dec. 21,2017 USA 62/613,779 Jan. 5, 2018 USA 62/659,157 Apr. 18, 2018 SouthKorea 10-2018-0045558 Apr. 19, 2018which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

The present invention relates to route planning in a metropolitan area.A goal of route planning is to determine how to travel from one locationto other location using the vehicles available from various providers oftransport services. Often it is required for the travel to last aslittle time as possible, or depart at a certain time, among otherrequirements. A route typically specifies instructions for a rider,including walk paths and vehicle ride paths.

BRIEF SUMMARY OF THE INVENTION

Embodiments include a method for computing routes, a computer systemthat implements and executes the method, and a computer service productthat allows users to issue routing queries and receive routes asanswers.

According to an embodiment of the present invention, a method forgenerating a route plan is provided. The method receives a query in aform of a source and a target locations of a route, and otherrequirements that may include a departure time or an arrival deadline.The method builds graphs that model statistical properties of thevehicles. One of the aspects is a “prospect edge” that models travelfrom a location to other location using any of a range of choices ofvehicles and walks. In one embodiment, that edge models an expectedminimum travel duration between the two locations. Using a graph, or itsextension dependent on specifics of the query, the method generates aroute plan as an answer to the query.

According to an embodiment of the present invention, a computer systemfor generating a route plan is provided. The system is a combination ofhardware and software. It obtains information about the transportationsystem and walks among locations from a plurality of data providers. Thesystem builds a plurality of graphs that model the transportationsystem, and computes shortest paths in graphs in order to generate aroute plan.

According to an embodiment of the present invention, a computer serviceproduct for generating a route plan is provided. The service allows auser to specify queries through a User Interface on a device, includinga smartphone, and displays generated route plans on the device.

The embodiments of the invention presented here are for illustrativepurpose; they are not intended to be exhaustive. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the embodiments.

The data retrieval, processing operations, and so on, disclosed in thisinvention are implemented as a computer system or service, and not asany mental step or an abstract idea that is disembodied.

In the presentation, the terms “the first”, “the second”, “the”, andsimilar, are not used in any limiting sense, but for the purpose ofdistinguishing, unless otherwise is clear from the context. Anexpression in a singular form includes the plural form, unless otherwiseis clear from the context.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING

The drawings included in the present invention exemplify variousfeatures and advantages of the embodiments of the invention:

FIG. 1: depicts a graph G0 according to an embodiment of the invention;

FIG. 2: depicts a process flow for constructing graph G0 according to anembodiment of the invention;

FIG. 3: depicts a travel from c to c′ involving a walk, a wait, a busride, and a walk according to an embodiment of the invention;

FIG. 4: depicts a travel from c to c′ involving one bus line but twoways of travel according to an embodiment of the invention;

FIG. 5: depicts two bus lines, each offers a distinct way of travel fromc to c′ according to an embodiment of the invention;

FIG. 6: depicts a travel from c to c′ involving a walk, a wait, a subwayride, and a walk according to an embodiment of the invention;

FIG. 7: depicts a prospect edge for three choices for travel from c toc′ according to an embodiment of the invention;

FIG. 8: depicts a prospect edge for two choices for travel from c to c′given duration random variables conditioned on the time of arrival ofthe rider at c according to an embodiment of the invention;

FIG. 9: depicts pseudocode for computing prospect edges under theinterval model of wait durations and fixed travel durations according toan embodiment of the invention;

FIG. 10: depicts how graph G1 extends graph G0 with edges from sources,when sources in queries are known according to an embodiment of theinvention;

FIG. 11: depicts how graph G2 extends graph G0 with prospect edges totargets, when targets in queries are known according to an embodiment ofthe invention;

FIG. 12: depicts an example of computing choices for prospect travelcontinuing from a penultimate stop/station, when the target is revealedat query time according to an embodiment of the invention;

FIG. 13: depicts a process flow of a computer system for answeringrouting queries according to an embodiment of the invention;

FIG. 14: depicts an example of a rendering of a route in response to aquery by a service product on a smartphone of a user according to anembodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION 4 Detailed Description

A metropolitan transport system is composed of vehicles, for examplesubways and buses. A common goal for a rider is to determine a fastestroute from a given location to other location within the metropolitanarea. A route can be computed using timetables of the vehicles, and adesired departure time or arrival deadline, as can be seen at majorproviders of mapping services online. However, in practice some vehiclesdo not follow timetables exactly, for example due to traffic. Incontrast to prior art, the present invention teaches how to computeroutes using a mix of vehicles that follow, and not follow, thetimetables. The invention utilizes route similarities and wait durationsto improve routing results.

Let us illustrate the improvements with a simple example. Consider twoconsecutive bus stops b₁ and b₂ along the route of a bus. A ride takes20 minutes on average. Suppose further that the bus arrives at b₁ every24 minutes on average. For a rider arriving at b₁ at a random time, theaverage travel duration to b₂ is 32 minutes (wait+ride). Now, supposethat there is other bus that also rides between these two bus stops.Under the same timing assumptions, and assuming independence of thebuses, the average travel duration is four minutes shorter. In general,with n buses, the average is 20+24/(n+1) minutes. This simply is becausethe rider can board a bus that arrives at b₁ first.

However, a natural metropolis is more complicated than our simpleillustration: there can be sophisticated overlap patterns of routes,with vehicles having differing arrival and speed patterns. It is noteven strictly necessary for routes to overlap to achieve improvements,as riders may walk among vehicle stops. The transport system may evolveover time, as subway timetables change and bus routes get added, forexample. Besides, we desire an efficient method for computing routes, soas to enable a computer to quickly answer many routing queries even forthe largest metropolitan areas.

4.1 Model Outline

We introduce a model of a transport system for computing routes or routedurations.

We assume that the transport system is composed of two types ofvehicles: (1) vehicles that follow fixed timetables, departing andarriving at predetermined times of the day, for example according to aschedule for weekdays; we call this vehicle a subway, and call its stopssubway stations, (2) vehicles whose departure and arrival times are notfixed; we call this vehicle a bus, and its stop bus stops. Both subwaystations and bus stops have fixed geographical locations, so we candetermine walks among them. Buses are grouped into bus lines. Any bus ofa bus line rides along a fixed sequence of bus stops, commonly until theterminal bus stop of the bus line.

In practice, some buses may quite punctually arrive, which may appear tonot conform with our model. For example, consider a bus dispatched fromthe first bus stop of the bus line according to a fixed timetable. Thebus may punctually arrive at the first few stops, until reaching an areaof the metropolis with unpredictable traffic. When a rider arrives atone of these first bus stops after a subway ride, the wait duration forthe bus is predictable, and so is the total subway-walk-bus travelduration. We can model this case by conceptually adding a subway torepresent this multi-vehicle subway-walk-bus travel. Similarly, we canconceptualize bus-walk-subway, bus-walk-bus, and subway-walk-subway, andother combinations, when the rides are synchronized or quite punctual.To simplify the presentation of the disclosure, we maintain ourassumption of fixed-timetable subways and non-fixed-timetable buses inthe rest of this invention description.

Our method is not restricted to routing people by buses or subway. Incontrast, our method is more general. It captures many kinds of vehiclesthat occur in practice. For example, these include: a subway, a bus, atram, a train, a taxi, a shared van, a car, a self-driving car, a ferryboat, an airplane, a delivery motorbike, a cargo lorry, or a containertruck. A route produced by our method can be used to route any object.For example, these include: a person, a cargo, a package, a letter or afood item. We sometimes refer to this object as a rider.

The transport system is modeled through a collection of directed graphs,each consisting of vertices and edges. Each vertex represents a busstop, a subway station, or an auxiliary entity. Other examples of vertexrepresentations include a train station, a taxi stand, a shared vanpickup or drop-off location, a car park, a self-driving car pickup ordrop-off location, a platform, a floor, a harbor, a ferry or airterminal, an airport, or a loading dock. Any edge represents a wait, atravel from one to other location, or an auxiliary entity. In oneembodiment, an edge has a weight denoting a duration of wait or travel.In other embodiment, a weight is a random variable. In other embodiment,some random variables are conditioned, for example on the time of theday, holiday/non-holiday day type, among others. In other embodiment,some random variables may be correlated with other random variables.

In one embodiment, we determine a probability distribution for a randomvariable from historical data. For example, we measure how long a bus ofa given bus line took to travel from a given bus stop b₁ to a given busstop b₂ throughout a period of a month, and determine an empiricaldistribution of travel duration from this one month of samples. In otherexample, we measure arrival or departure times of a bus of a given busline from a given bus stop over a period of time, and determine anempirical distribution of a wait time for a bus of the bus line, foreach minute of a weekday. In other example, we use a passing intervalreported by a bus operator to determine an average wait time. In otherexample, a current location of a bus is used to compute a more accuratedistribution of a wait duration for the bus.

Some of the random variables used in our method are non-trivial. Atrivial random variable has just one value with probability 1. Any otherrandom variable is non-trivial.

A goal of any graph is to help answer any query to find a route or aroute duration between any two geographical locations. The startingpoint of a route is called a source, and the ending point called atarget. The locations are determined by the application of the routingsystem. For example, the locations could be commercial enterprises, busand subway stations themselves, arbitrary points in a park, or thecurrent location of a person determined by a Global Positioning System.In one embodiment, we search for a route by applying a Dijkstra'sshortest paths algorithm or an A* (A star) search algorithm to a graph,or some adaptations of these algorithms as discussed later.

In some embodiments, we add restrictions on routes. For example, theseinclude: a vehicle type, a vehicle stop type, a threshold on the numberof vehicle transfers, a threshold on a wait duration, a threshold on awalk duration, a type of object being routed which may fit in onlyspecific vehicles, a threshold on a monetary cost of travel, a departuretime from the source, an arrival time at the target, or a desiredprobability of arriving before a deadline.

In one embodiment, our method computes routes or route durations thathave a smallest expected duration. However, our method is more general.It also computes routes or route durations that are approximatelyfastest, or that may not be fastest, but that limit the risk of arrivingafter a given deadline.

Our invention builds several graphs to answer routing queries. Someembodiments extend a graph with extra vertices and edges based on thequery.

4.2 Graph G0

The graph called G0 represents routing among bus stops and subwaystations. A detailed description of its construction follows. Anillustration of a graph G0 is in FIG. 1, and an illustration of theprocess flow of the construction is in FIG. 2.

4.2.1 Fixed Timetables

The first group of vertices and edges represents routing by vehiclesthat follow fixed timetables. Because timetables are fixed, we can use aknown algorithm to compute a fastest route between two locations, thatcan involve a sequence of multiple vehicles with walks in-between.Hence, we use a single edge to abstract this multi-vehicle travel from asource to a target.

We add vertices that model boarding subway without waiting, as if therider timed their arrival at a station with a departure of the subway.We introduce two vertices for each subway station s:

SUBWAY_FROM_s

and

SUBWAY_STATION_s.

For any two distinct stations s and s′, we have an edge

SUBWAY_FROM_s→SUBWAY_STATION_s′

representing a ride duration from s to s′, possibly involving changingsubways and walking (for example from station s, first take subway A tostation B, then walk to station C, then take subway D to station s′);the edge is labelled RideManyGetOff. In one embodiment, the weight ofthe edge is a minimum ride duration during weekday morning rush hours.In other embodiment, we use a random variable for each of many timewindows. In other embodiment, the random variable is conditioned on anarrival time of the rider at a location of s, or a departure time from alocation of s.

We model an event when a rider arrives at a subway station later duringtravel, and may need to wait for the subway. For any two distinctstations s′ and s″, we add a vertex

SUBWAY_FROM_TO_s′ s″

that denotes riding from s′ to s″. There is an edge

SUBWAY_STATION_s′→SUBWAY_FROM_TO_s′ s″

labelled WaitGetOn representing a wait duration to get on a subwaytraveling from s′ to s″. In one embodiment, the weight of the edge isset to an average wait for a subway that transports the rider to s″ theearliest, given the rider arriving at s′ at a random time during weekdaymorning rush hours. In other embodiment, the weight is set to half of anaverage interarrival time of any subway from s′ to s″. In otherembodiment, we use a random variable for each of many time windows. Inother embodiment, the random variable is conditioned on an arrival timeof the rider at a location of s′, or a distribution of the arrival time.

We add an edge

SUBWAY_FROM_TO_s′_s″→SUBWAY_STATION_s″

labelled RideManyGetOff representing a ride duration from s′ to s″possibly involving changing subways and walking. In one embodiment, theweight of the edge is set to an average shortest ride duration duringweekday morning rush hours. In other embodiment, we use a randomvariable for each of many time windows. In other embodiment, the randomvariable is conditioned on an arrival time of the rider at a location ofs′, or a departure time from a location of s′.

4.2.2 Non-Fixed Timetables

The second group of vertices and edges represents routing by vehiclesthat do not follow fixed timetables.

For every bus line, we add vertices that model its bus stops, and a busat the bus stops. The former abstracts a rider outside the bus, thelatter a rider inside the bus. Let b₁, . . . , b_(n) be the nconsecutive bus stops along a bus line e (including on-demand stops).Then we add vertices

BUS_STOP_b_(k)

and

BUS_AT_BUS_STOP_b_(k)_k_e,

for each k, 1≤k≤n. Two bus lines may share a bus stop. There is an edge

BUS AT BUS STOP b_(k) k e→BUS STOP b_(k)

labelled GetOff denoting disembarking the bus at this bus stop; the edgehas zero weight. There is an edge in the reverse direction

BUS_STOP_b_(k)→BUS_AT_BUS_STOP_b_(k)_k_e

labelled WaitGetOn representing a duration of waiting for a bus of busline e at bus stop b_(k) before embarking. In one embodiment, the weightof the edge is set to half of an average interarrival time of a bus ofbus line e during weekday morning rush hours, which is the same forevery bus stop of that bus line. In other embodiment, we use a randomvariable for each of many time windows and bus stops. In otherembodiment, the random variable is conditioned on an arrival time of therider at a location of b_(k), or a distribution of arrival time.

To model travel inside the same bus, we add an edge

BUS_AT_BUS_STOP_b_(k)_k_e→BUS_AT_BUS_STOP_b_(k+1)_k+1_e

labelled RideSame representing a duration of a ride from bus stop b_(k)to the next bus stop b_(k+1) by bus line e. In one embodiment, theweight of the edge is set to an average ride duration between these busstops during weekday morning rush hours. In other embodiment, we use arandom variable for each of many time windows and bus stops. In otherembodiment, the random variable is conditioned on an arrival time of abus at a location of b_(k), or a departure time from a location ofb_(k).

4.2.3 Walks

We use walks to connect bus stop and subway station vertices.

In this and other sections of the invention disclosure we allow variousrequirements for walks. In one embodiment, we use a walk with a shortestduration at a specific speed of 4 km/h. In other embodiment, the weightis a random variable for each of several walk path requirements,including speed 6 km/h, avoid stairs, avoid dark streets. In otherembodiment, we allow only walks with duration at most a fixed amount oftime, for example one hour. In other embodiment, a walk is straight-linethat ignores any obstacles. In other embodiment, a walk can includetravel by a lift, a moving path, an elevator, or an escalator.

We add edges

BUS_STOP_b→BUS_STOP_b′,

BUS_STOP_b→SUBWAY_STATION_s,

SUBWAY_STATION_s→BUS_STOP_b, and

SUBWAY_STATION_s→SUBWAY_STATION_s′,

for any b, b′, s, s′, when allowed by the requirements. Each edge islabelled Walk, and its weight represents a duration of a walk.

4.2.4 Constraints

Next we add auxiliary vertices that enable modeling a constraint on thefirst wait along a route. In one embodiment the wait is zero, whichmodels a rider walking to the stop/station just early enough to catch adeparting bus/subway, but not earlier. In other embodiment, the waitdepends on a start time of travel, which models a rider starting thetravel at a specific time; for example leaving home at 8 am.

We cluster bus stops and subway stations based on their geographicalproximity. In one embodiment, we fix the cluster radius to 2 meters. Inother embodiment, we select the number of clusters depending on aresource/quality trade-off required by the user of the routing system.In other embodiment, the cluster radius is 0 meters, in which case theclusters are simple replicas of bus stops and subway stations.

For each cluster c, we add a vertex

STOPSTATION_CLUSTER_SOURCE_c

and add edges connecting the cluster to its buses and subways:

STOPSTATION_CLUSTER_SOURCE_c→BUS_AT_BUS_STOP_b_(k)_k_e and

STOPSTATION_CLUSTER_SOURCE_c→SUBWAY_FROM_s,

when b_(k) or s are in cluster c. The edges are labelled FirstWaitGetOn.In one embodiment, the weight of the edge is 0. In other embodiment, theweight of the edge is a random variable denoting a wait duration for avehicle (bus e, or subway) conditioned on a time of arrival of the riderat the location of the vertex (bus stop b_(k), or subway station s). Inother embodiment, the weight is increased by a walk duration between cand b_(k) or s, for example when cluster radius is large.

Note that any non-trivial path in the graph from

STOPSTATION_CLUSTER_SOURCE_c

will traverse that FirstWaitGetOn edge exactly once.

We add other auxiliary vertices. We cluster bus stops and subwaystations similar as before, and for each cluster c, add a vertex

STOPSTATION_CLUSTER_TARGET_c

and edges

BUS_STOP_b→STOPSTATION_CLUSTER_TARGET_c and

SUBWAY_STATION_s→STOPSTATION_CLUSTER_TARGET_c,

for every b and s, when in cluster c. The edges are labelled Zero andhave weight 0. In other embodiment, the weight is increased by a walkduration, for example when cluster radius is large.

The introduction of vertices

STOPSTATION_CLUSTER_TARGET_c

can help decrease the size of the graph when there are many routingtarget locations. In other embodiment, we can replace these verticeswith direct edges from

BUS_STOP_b

and

SUBWAY_STATION_s

to the target, for any b and s when appropriate.

The graph constructed so far models a duration of travel from

STOPSTATION_CLUSTER_SOURCE_c

to

STOPSTATION_CLUSTER_TARGET_c′,

for any c and c′, such that the first bus or subway is boarded withoutwaiting or with given waiting, and after the rider gets off the bus orthe subway sequence, any subsequent vehicle ride requires waiting toboard.

4.2.5 Prospect Edges

Next we add auxiliary vertices and edges that reflect improvements intravel duration due to using any of several vehicles. The improvementsmay be caused by a shorter wait for any vehicle, or a shorter ride byany vehicle.

The duration of waiting to board a vehicle can be modeled by assumingthat the rider arrives at a stop/station at a random time, because of astochastic nature of the vehicles that use non-fixed timetables. Ifthere were two consecutive RideManyGet Off vehicle ride edges on a graphpath, the edges could be replaced by one RideManyGetOff edge.

We introduce a prospect edge, which abstracts travel between twolocations using one of several choices of vehicles. In one embodiment,the weight of the edge is the value of an expected minimum travelduration among these choices.

In this section, the two locations connected by a prospect edge are nearvehicle stops. However, this is not a limitation of our method. Indeed,in a later section we describe a prospect edge that ends at an arbitrarylocation that may be far from any vehicle stop. In general, a prospectedge may connect arbitrary two vertices in a graph. However, for thesake of presentation, in this section we focus on prospect edges nearvehicle stops.

We cluster bus stops and subway stations based on their geographicalproximity, similar as before. Given two distinct clusters c and c′, weconsider any way of traveling from c to c′ by a walk, followed by a busride, followed by a walk, any of the two walks can have length 0. Forexample, FIG. 3 depicts a case when there is a walk from c to vertex

BUS_STOP_b,

and from there a graph path involving bus line e with edges WaitGetOn,RideSame, and GetOff, ending at a vertex

BUS_STOP_b′,

and then a walk from

BUS_STOP_b′

to c′. Let T be a random variable representing a duration of travel fromc to c′ using the walks from c to b and from b′ to c′, and a bus ridefrom b to b′ modeled by a graph path. This variable is just a sum of therandom variables of the graph edges along the path, plus the randomvariables of two front and back walks. Its distribution can beestablished from the constituent distributions. In one embodiment, wecondition the random variable on a departure time from c.

In one embodiment, this random variable T is uniformly distributed on aninterval [x, y], where the interval tips are

-   -   x=(minimum walk duration from c to b)        -   +(sum of an expected RideSame duration along the path edges)        -   +(minimum walk duration from b′ to c′), and    -   y=x+2·(expected WaitGetOn duration).        In other embodiment, the tips are adjusted by a multiplicity of        a standard deviation of the random variables. In other        embodiment, we consider c, b, b′, c′ only when the walk        durations from c to b and from b′ to c′ are at most a fixed        amount time, for example one hour. In other embodiment, any of        the walks may be zero-length (an optional walk). In other        embodiment, we require a shortest duration walk from c to b, or        from b′ to c′. In other embodiment, walks may have embodiments        as in Section 4.2.3. In other embodiment, the random variable T        is non-uniform. In other embodiment, the random variable T is        conditioned on an arrival time of the rider at a location of c.

For a fixed bus line e, there may be many alternatives for travelingfrom c to c′, because the rider can board/get off at various bus stopsof that bus line, and use walks for the rest of the travel. For example,FIG. 4 extends FIG. 3 by showing an alternative ride: to one furtherstop

BUS_STOP_b″

that increases a total ride duration, but decreases a total walkduration. In one embodiment, from among these alternatives, we take arandom variable T that has a lowest expectation. Let us denote thisvariable T_(c,c′,e). This is a fixed random variable for the bus line e,and the start and the end clusters c and c′. The variable denotes afastest travel duration for getting from c to c′ by the bus line estochastically. In one embodiment, when the candidates for T_(c,c′,e)are uniformly distributed on intervals, a lowest expectation candidateis just a candidate with a smallest median value of its interval. Inother embodiment, we use one variable for each of many time windows, forexample so as to capture higher frequency of buses during peak hours,and also higher road traffic. In other embodiment, the random variableis conditioned on an arrival time of the rider at a location of c.

Let us consider all bus lines e₁ through e_(n) that can help transport arider form c to c′. Note that the constituent walks and bus stops maydiffer. For example, FIG. 5 shows two bus lines e₁ and e₂, each usingdistinct bus stops, and having different walk durations. Let T_(c,c′,e)₁ through T_(c,c′,e) _(n) be respective fastest travel duration randomvariables, as defined before.

We can compute an expected minimum of the variablesE[min_(1≤i≤n)T_(c,c′,c) _(i)]. This expectation models travel durationby “whichever bus will get me there faster”. In one embodiment, therandom variables of different bus lines are independent. That isT_(c,c′,e) _(i) is independent from T_(c,c′,e) _(j) for any two distinctbus lines e_(i) and e_(j). In other embodiment, the random variables areindependent uniform on a common interval [x, y]. Then an expectedminimum is (y+n·x)/(n+1). In other embodiment, we compute theexpectation through a mathematical formula, approximate integration,random sampling, or other approximation algorithm or a heuristic for anexpected minimum. When an approximation algorithm is used, then ourmethod no longer produces shortest routes, but instead producesapproximately shortest routes.

Now we discuss how to include subways into a computation of an expectedminimum travel duration. Similar to buses, let T_(c,c′,s,′) be a randomvariable of fastest travel duration from c to c′ using walks and subwayrides. As illustrated in FIG. 6, there is a walk from c to s, a path inthe graph

SUBWAY_STATION_s

→SUBWAY FROM TO s s′

→SUBWAY_STATION s′,

and a walk from s′ to c′. A distribution of this variable can beestablished from constituent distributions. In one embodiment, wecondition the random variable on a departure time from c.

In one embodiment, T_(c,c′,s,s′) is uniformly distributed on an interval[x, y], where the interval tips are

-   -   x=(minimum walk duration from c to s)        -   +(expected RideManyGetOff duration on the graph path)        -   +(minimum walk duration from s′ to c′), and    -   y=x+2·(expected WaitGetOn duration on the graph path).        In other embodiment, the tips are adjusted by a multiplicity of        a standard deviation of the random variables. In other        embodiment we restrict the walk durations from c to s and from        s′ to c′ to at most a fixed amount time, for example one hour.        In other embodiment, any of the walks may be zero-length (an        optional walk). In other embodiment, we require a shortest        duration walk from c to s, or from s′ to c′. In other        embodiment, walks may have embodiments as in Section 4.2.3. In        other embodiment, T_(c,c′,s,s′) is non-uniform. In other        embodiment, T_(c,c′,s,s′) is conditioned on an arrival time of        the rider at a location of c. In other embodiment, we use one        variable for each of many time windows.

A complication arises in that the subway random variables are pairwisedependent, because they are derived from fixed subway schedules. Thismay complicate a computation of an expected minimum travel duration fromc to c′.

Let us consider all subway rides that can help transport a rider from cto c′, and let s₁, s′₁, . . . , s_(m), s′_(m) be the m embarkation anddisembarkation subway stations with the respective random variablesthrough T_(c,c′,s) ₁ _(,s) ₁ _(′) through T_(c,c′,s) _(m) _(,s′) _(m) .

In one embodiment, any one subway random variable together with all busline random variables are independent. In that case we can compute anexpected minimum travel duration for buses and subways as a minimum ofexpected minima, adding one subway ride at a time to the pool of busrides, and denote it as P(c, c′), as in the following equation:

$\begin{matrix}{{P\left( {c,c^{\prime}} \right)} = {\min\limits_{1 \leq j \leq m}{{E\left\lbrack {\min \left( {{T_{c,c^{\prime},s_{j},s_{j}^{\prime}}T_{{c,c^{\prime},e_{1}}\;}},\ldots \mspace{14mu},T_{{c,c^{\prime},e_{n}}\;}} \right)} \right\rbrack}.}}} & (1)\end{matrix}$

We call P(c, c′) a prospect travel, because it is a travel form c to c′involving any of several transportation choices, opportunistically. Wecall the m n constituent random variables T_(c,c′,s) _(j) _(,s′) _(j)and T_(c,c′,c) _(i) the choices.

In one embodiment, T_(c,c′,e) _(i) is uniform over an interval, and sois T_(c,c,s) _(j) _(,s′) _(j) . In that case we compute an expectedminimum E[min T_(i)], for some number of T_(i), each uniform over aninterval [x_(i), y_(i)].

For example, FIG. 7 shows travel from c to c′ involving three choices:

bus line e′ with wait uniform on [0,900] and walk&ride 1700,

bus line e″ with wait uniform on [0,3600] and walk&ride 1000,

subway with wait uniform on [0, 300] and walk&ride 2200.

In that case a minimum expected travel duration is 2150=min{2150, 2800,2350}, which does not reflect improvements from travel by “whichever isfaster”. However, an expected minimum is lower: P(c, c′)=1933.

In other example, FIG. 8 illustrates probability distributionsconditioned on a time when the rider arrives at c (the source of aprospect edge). There are two choices of getting from c to c′, one bybus and the other by subway. Each choice has its own conditionalprobability distributions for wait and for walks and ride.

There is a gain in duration due to a prospect travel, if the value ofP(c, c′) is less than a minimum of expectations min(min_(1≤j≤m)E[T_(c,c′,s) _(j) _(,s′) _(j) ], min_(1≤i≤n) E[T_(c,c′,e) _(i) ]). Inthat case, we add to the graph: vertices

PROSPECT_CLUSTER_SOURCE_c

and

PROSPECT_CLUSTER_TARGET_c′,

and an edge

PROSPECT_CLUSTER_SOURCE_c→PROSPECT_CLUSTER_TARGET_c′

labelled AvgMinWalkWaitRideWalk with the weight P(c, c′). We also addedges from bus and subway stations of the cluster c to the vertex

PROSPECT_CLUSTER_SOURCE_c,

and edges from the vertex

PROSPECT_CLUSTER_TARGET_c′

to bus and subway stations in the cluster c′; these edges are labelledZero and have zero weight. In one embodiment we add the prospect edgeonly when its weight P(c, c′) results in a gain that is above athreshold, for example at least 10 seconds.

We remark that our method does not require the rider to board a firstarriving of the transportation choices, simply because a subsequentchoice, even though requiring a longer wait, may arrive at thedestination faster (consider an express bus versus an ordinary bus). Ourmethod does not even require boarding a bus at the same stop/station,because the rider may walk to other stop/station, for exampleanticipating an express train departing from there.

Definition 1 [062] In one embodiment, prospect travel is defined interms of:

-   -   any two locations c and c′,    -   any number k≥2 of random variables T₁, . . . , T_(k), each        representing a duration of travel from c to c′,    -   the k variables are independent, dependent, or correlated        arbitrarily,    -   any of the k variables may be conditioned on a time A of arrival        of the rider at a location c; the time A may be a random        variable.        The duration of prospect travel is a minimum min(T₁, . . . ,        T_(k)), which by itself is a random variable. The weight of a        prospect edge is an expected value of this minimum P(c,        c′)=E[min(T₁, . . . , T_(k))].

In other embodiment, a random variable T_(i) is distributed uniformly onan interval. In one embodiment, a random variable T_(i) is conditionedon an arrival time at c that falls within a specific time window, or aprobability distribution of arrival time at c.

In one embodiment, in order to determine the random variables T₁, . . ., T_(k), we determine a list of vehicle stops near c and durations ofwalks to these stops from c, and a list of vehicle stops near c′ andduration of walks from these stops to c′, and then for each pair ofvehicle stops on the two lists, we determine a travel duration randomvariable.

In one embodiment, we compute various statistics on a random variablemin(T₁, . . . , T_(k)). One is the already mentioned expected value. Butwe also compute a probability mass, which can be used to determine anarrival time that can be achieved with a specific probability. In orderto compute these statistics, we use several methods, including sampling,a closed-form formula, approximate integration, and other approximationalgorithm or a heuristic.

In one embodiment, we pre-compute a component of prospect travel andstore it, so that when prospect travel needs to be determined, we canretrieve the component from storage and avoid computing the componentfrom scratch. Examples of such components include: a random variable ofa duration of travel between a pair of vehicle stops; an expectedminimum of two or more travel duration random variables; a probabilitydistribution of a minimum of at least two travel duration randomvariables; or a path or a travel duration between a pair of vehiclestops.

So far we have defined how to compute a prospect edge for a given c andc′. We apply this definition to all pairs of distinct c and c′, whichdetermines which prospect clusters get connected, and which do not getconnected, by a prospect edge, and of what weight.

In one embodiment, instead of considering a quadratic number of c and c′pairs, we perform a graph traversal. In one embodiment, we use a“forward” traversal from vertex

PROSPECT_CLUSTER_SOURCE_c,

for each c, towards every vertex

PROSPECT_CLUSTER_TARGET_c′

that is reachable by walk-bus/subway-walk. During this traversal, weidentify the graph paths that lead to the

PROSPECT_CLUSTER_TARGET_c′,

for each c′. Once we have identified all such paths for a specific c′,we have computed all the choices between the

PROSPECT_CLUSTER_SOURCE_c

and the

PROSPECT_CLUSTER_TARGET_c′,

and thus can compute an expected minimum of these choices (see FIG. 9for a further example). Because we limit the exploration to only thereachable parts of the graph, we can often compute prospect edges moreefficiently. In one embodiment, we use a symmetric method of a“backward” traversal from vertex

PROSPECT_CLUSTER_TARGET_c′,

for each c′, backwards to every vertex

PROSPECT_CLUSTER_SOURCE_c

that is reachable by a “reversed” path walk-bus/subway-walk.

FIG. 9 illustrates an embodiment of the process of adding prospect edgesto graph G0, in the case when any wait duration is uniformly distributedon an interval [0,2·WaitGetOn] for the respective edge, and a rideduration is deterministic.

4.3 Extensions of Graph G0

We describe extensions to the graph G0. Each extension is useful for aspecific kind of routing queries.

4.3.1 Sources Known Beforehand

In some embodiments the source locations of routing queries are known inadvance. For example, suppose that we are interested in finding ashortest route from every restaurant in the metropolitan area, and therestaurant locations are known. This can be achieved with the help of anextended graph G0.

In one embodiment, for each such source s, we add a vertex

SOURCE_s.

See FIG. 10 for an illustration. In one embodiment, we add an edge from

SOURCE_s

to any bus stop and subway station cluster

STOPSTATION_CLUSTER_SOURCE_c

in the graph G0. The edge is labelled Walk, and its weight represents aduration of a walk. In other embodiment, we use a shortest walk withduration that is at most a threshold, or other embodiments as in Section4.2.3.

The resulting graph is denoted G1 (it includes G0). G1 can be used tocompute shortest paths from any

SOURCE_s

to any

STOPSTATION_CLUSTER_TARGET_c.

In one embodiment, some paths are pre-computed, stored, and retrievedfrom storage when a query is posed.

In other embodiment, we use a symmetric method when targets are knownbeforehand: for each target t, we add a vertex

TARGET_t,

and add an edge from any

STOPSTATION_CLUSTER_TARGET_c

to any

TARGET_t

labelled Walk. The resulting graph is denoted G1′.

4.3.2 Targets Known Beforehand

In some embodiments the target locations of routing queries are known inadvance, and we extend G0 with prospect edges to the targets.

For each target t, we add a vertex

TARGET_t.

See FIG. 11 for an illustration. In one embodiment, we add an edge fromany bus stop and subway station cluster

STOPSTATION CLUSTER TARGET c

in graph G0 to

TARGET_t.

The edge is labelled Walk, and its weight represents a duration of awalk. In other embodiment, we use a shortest walk with duration that isat most a threshold, or other embodiments as in Section 4.2.3.

We add prospect edges according to a process similar to Section 4.2.5.Specifically, for any

PROSPECT_CLUSTER_SOURCE_c

and

TARGET_t,

we determine all paths from c to t of two kinds:(1) a ride by a bus with walks: walk from c to b, graph path

BUS_STOP_b

→BUS_AT_BUS_STOP_b_i_e

→BUS_AT_BUS_STOP_b′_j_e

→BUS STOP b′

→STOPSTATION_CLUSTER_TARGET_c″

→TARGET_t,

(2) a ride by subways with walks: walk from c to s′, graph path

SUBWAY_STATION_s′

→SUBWAY_FROM_TO_s′_s″

→SUBWAY_STATION_s″

→STOPSTATION CLUSTER TARGET c′

→TARGET_t.

In other embodiment, we use a shortest walk with duration that is atmost a threshold, or other embodiments as in Section 4.2.3. We definethe random variables of travel duration along each path just like inSection 4.2.5.

In one embodiment, we assume that the kind (1) are independent randomvariables, and the kind (2) are dependent. And then we compute anexpected minimum travel duration by considering a pool of all kind (1)random variables (appropriately removing duplicates for repeated buslines), adding to the pool one kind (2) random variable at a time, likein Equation 1 for P(c, c′). In other embodiment, we use Definition 1 ofprospect travel. This defines P(c, t), called prospect travel from c tot.

When there is gain in travel duration over a minimum of expectations, weadd an edge from

PROSPECT_CLUSTER_SOURCE_c

to

TARGET_t

labelled AvgMinWalkWaitRideWalk with weight P(c, t). We use similarembodiments to these we used for the edge from

PROSPECT_CLUSTER_SOURCE_c

to

PROSPECT_CLUSTER_TARGET_c′

defined before.

In one embodiment, we use a “forward” or a “backward” graph traversal asdescribed in Section 4.2.5 to speed up a computation of prospect edgesbetween

PROSPECT_CLUSTER_SOURCE_c

and

TARGET_t,

for all c and t. In other embodiment, this traversal could be mergedinto a traversal when computing prospect edges in G0.

The resulting graph is denoted G2 (it includes G0). G2 can be used tocompute shortest paths from any

STOPSTATION CLUSTER SOURCE c

to any

TARGET_t.

In one embodiment, some paths are pre-computed, stored, and retrievedfrom storage when a query is posed.

In other embodiment, we use a symmetric method when sources are knownbeforehand: for each source s, we add a vertex

SOURCE_s,

and compute a prospect edge from any

SOURCE_s

to any

PROSPECT_CLUSTER_TARGET_c.

The resulting graph is denoted G2′.4.3.3 Source Revealed when Query is Posed, Targets Known

In some embodiments the target locations of routing queries are known inadvance, but the source is revealed only when a query is posed.

In one embodiment, we use the graph G2 of Section 4.3.2 to compute ashortest ride.

When a query (s, t) is posed, we determine walks from the location of sto each

STOPSTATION_CLUSTER_SOURCE_c.

In one embodiment, we use a shortest walk with duration that is at mosta threshold, thereby generating a list of vehicle stops near the sourcelocation, or other embodiments as in Section 4.2.3. We also determine ashortest travel continuation from

STOPSTATION_CLUSTER_SOURCE_c

to

TARGET_t

in graph G2. In one embodiment, we pre-compute shortest path durationfrom each

STOPSTATION_CLUSTER_SOURCE_c

to each

TARGET_t,

and store the results. We look up these results from storage when aquery is posed. In other embodiment, we use a graph shortest pathalgorithm in G2 to compute a duration when a query is posed.

We find a cluster c that minimizes a sum of durations of a walk from sto c and a travel continuation from c to t. This minimum is a shortesttravel duration from s to t.

In other embodiment, we use a symmetric method when a target is revealedonly when a query is posed. Then, instead of generating a list ofvehicle stops near the source location, we generate a list of vehiclestops near the target location.

In other embodiment, instead of using graph G2, we use graph G1′.

4.3.4 Target Revealed when Query is Posed, Sources Known

In some embodiments the source locations of routing queries are known inadvance, but a target is revealed only when a query is posed.

In one embodiment the graph G1 of Section 4.3.1 is used to compute ashortest ride. However, we need to compute prospect edges to the target.This computation is more involved than Section 4.3.2, because the targetis unknown beforehand.

We recall how choices were computed for each prospect edge in G0. Foreach clusters c and c′, let choices(c, c′) be these choices used tocompute P(c, c′) for the edge from

PROSPECT_CLUSTER_SOURCE_c

to

PROSPECT_CLUSTER_TARGET_c′

in G0. It is possible that choices(c, c′) has just one choice (e.g., onebus, or one subway ride). The choices(c, c′) is defined even if theprospect edge was not added in G0 due to lack of a sufficient gain.

Let the posed query be (s,t), for a source

SOURCE_s

in the graph G1, and an arbitrary target location t that may be notrepresented in the graph.

A shortest path from s to t may involve just one bus or only subways. Inthat case we need not consider prospect edges. We take the graph G1, andfurther extend it. We add vertex

TARGET_t,

and edges from

STOPSTATION_CLUSTER_TARGET_c,

for any c, to

TARGET_t.

Each of these edges is labelled Walk, and its weight is a walk duration.In one embodiment, any edge represents a shortest walk duration that isat most a threshold, or other embodiments as in Section 4.2.3. Wecompute a shortest path from

SOURCE_s

to

TARGET_t

in the resulting graph, and denote the path's length by A(s, t). Thislength is a candidate for a shortest travel duration from s to t.

There is other candidate. It is also possible that a shortest pathinvolves more vehicles. In that case, there is a penultimatestop/station along the path. To cover this case, we compute prospectedges to t. The process is illustrated in FIG. 12. To simplify theillustration, the drawing depicts singleton prospect clusters (each hasjust one bus stop, or just one subway station).

To compute prospect edges to t we start with a graph G1. We enumeratethe parts of the journey form s to t that end at a penultimatestop/station. Specifically, we determine a shortest travel duration from

SOURCE_s

to

PROSPECT_CLUSTER_SOURCE_c,

for each c. We denote this duration by shortest(s→c). For example, inFIG. 12 the value 900 on the edge from

SOURCE_s

to

SUBWAY_STATION_s₁

denotes a shortest travel duration from

SOURCE_s

to

PROSPECT_CLUSTER_SOURCE_s₁.

Note that this travel may pass along a prospect edge in the graph G1. Inone embodiment, this duration can be pre-computed and stored beforequeries are posed, and looked up from storage upon a query.

We determine how the journey can continue from each penultimatestop/station to the target t, using prospect edges and walks. For every

PROSPECT_CLUSTER_SOURCE_c,

we determine the choices of moving from c to t by first going to anintermediate

PROSPECT_CLUSTER_TARGET_c′,

called choices(c, c′), and then following by a walk from c′ to t. In oneembodiment, we consider only shortest walks c′ to t with duration thatis at most a threshold, or other embodiments as in Section 4.2.3. Forexample, in FIG. 12 the choices(b_(i), b₀) are depicted on the edge from

BUS_STOP_b₁

to

BUS_STOP_b₀

there are two choices: bus line e″ with wait duration uniform on [0,900]and travel duration 1600, and bus line e′″ with wait duration uniform on[0,3600] and travel duration 1000. It takes 240 to continue by walk from

BUS_STOP_b₀

to

TARGET_t.

Because a rider located at c may pick any c′ as a continuation, wecombine at t the choices across all c′. This combination forms thechoices for travel from c to t. For example, in FIG. 12 there is otheredge from

BUS_STOP_b₁;

that edge goes to

BUS STOP b₂.

The choices(b₁, b₂) depicted on that edge has just one choice: bus linee′ with wait duration uniform on [0,300] and travel time 900. It takes500 to continue by walk from

BUS_STOP_b₂

to

TARGET_t.

The combination of choices(b₁, b₀) with choices(b₁, b₂) yields threechoices (bus lines e′, e″ and e′″). These are the choices of going from

BUS_STOP_b₁

to

TARGET_t.

An expected minimum travel time using these choices is 2636.

We need to eliminate duplicate bus rides by the same bus line, like inSection 4.2.5. For example, in FIG. 12 a rider can depart from

SUBWAY_STATION_s₁

using the same bus line e″, but going to two different locations:

BUS_STOP_b₂

and

SUBWAY STATION s₀.

For any bus line at c, we retain only the choice for this bus line thathas a lowest expected travel duration from c to t (eliminate any otherchoice for this bus line at c). For example, in FIG. 12 we eliminate thechoice to

SUBWAY_STATION_s₀

because it has a higher expectation. We compute an expected minimumtravel duration, P(c,t), among the remaining choices, similar to how wecomputed P(c, c′) in Section 4.2.5.

A shortest path may pass any of the c, so we compute a minimum across c,and denote it B(s, t)

B(s, t)=min_(c){shortest(s→c)+P(c, t)}.

For example, in FIG. 12 the minimum B(SOURCE_s,TARGET_t)=2445, which ismin{2636, 2445}, because it is more advantageous for the rider to travelto a penultimate

SUBWAY_STATION_s₁,

rather than to a penultimate

BUS STOP b₁.

This quantity denotes a shortest travel duration from s to t thatinvolves a penultimate vehicle. B(s,t) is the other candidate for ashortest travel duration from s to t.

Finally, a response to the query is a minimum of the two candidates:min{A(s, t), B(s, t)}.

For example, in FIG. 12 a response to the query is still 2445, becausewe cannot shorten travel by using just one vehicle that travels from

SOURCE_s

through

BUS_STOP_b₀

to

TARGET_t,

because this travel duration is A(SOURCE_s, TARGET_t)=3000 +240.

In other embodiment, instead of using graph G1, we use the graph G2′.

In other embodiment, we use a symmetric method that computes prospectedges from a source, when the source is revealed only when a query isposed. Then, instead of considering a penultimate and a last stopsbefore arriving at the target, we consider a first and a second stopsafter departing from the source.

4.3.5 Source and Target Revealed at Query Time

When both the source and the target of a query are unknown beforehand,we select and combine the methods of previous sections. In oneembodiment, we determine walks from the location of the source s to

STOPSTATION_CLUSTER_SOURCE_c,

for each c, and then travel from

STOPSTATION_CLUSTER_SOURCE_c

to target t (involving penultimate choices, or not). We respond with aminimum sum, selected across c. In one embodiment, we use a shortestwalk with duration that is at most a threshold, or other embodiments asin Section 4.2.3.

4.4 Variants

Many modifications and variations will be apparent to those of ordinaryskill in the art without departing from the scope and spirit of theembodiments. We present of few variants for illustration.

In one embodiment, we use a more general notion of a prospect edge. Whentravel involves multiple vehicles and waits, a shortest path search in agraph may traverse multiple prospect edges, and these prospect edgesalong the path will together abstract a sequence of more than one waitand ride. To capture this multiplicity, in one embodiment, we use a moregeneral notion of a depth-d prospect edge that abstracts a sequence ofat most d waits&rides. For example, a pathc—walk1—wait1—bus1—walk2—wait2—bus2—walk3—c′ could be abstracted as adepth-2 prospect edge from c to c′. In one embodiment, we add depth-dprospect edges for d larger than 1 to our graphs.

In one embodiment, our method constructs routes given a departure time.For example, consider the case when the rider wishes to begin travel at8 AM on a Tuesday. Here, a routing query specifies a departure time, inaddition to the source and target locations of travel. In oneembodiment, the source is a

STOPSTATION_CLUSTER_SOURCE_s,

and the target is a

STOPSTATION_CLUSTER_TARGET_t.

We modify the graph G0, see FIG. 1. Because here even the first ride mayinvolve waiting, we remove the FirstWaitGetOn edges and the

SUBWAY_FROM_s

vertices, but add edges from each

STOPSTATION_CLUSTER_SOURCE_c

to

BUS_STOP_b

and

SUBWAY_STATION_s,

for any b and s in the cluster c. In one embodiment, we adopt theDijkstra's shortest paths algorithm to use prospect edges: For eachvertex

PROSPECT_CLUSTER_SOURCE_c,

we maintain a lowest known expected arrival time of the rider at thevertex, and use this time to condition the wait, walk and ride durationrandom variables to compute prospect edges to each

PROSPECT_CLUSTER_TARGET_c′.

Using thus computed edge weights, we update the lowest known expectedarrival times at

PROSPECT_CLUSTER_SOURCE_c′.

In other embodiment, instead of maintaining or updating a lowest knownexpected arrival time at each

PROSPECT_CLUSTER_SOURCE_c

or at each

PROSPECT_CLUSTER_TARGET_c,

we maintain or update a probability distribution of arrival time. Inother embodiment, we adopt other shortest paths algorithms, for examplethe A* (A star) search algorithm in a similar fashion. In otherembodiment, for example when a departure time is “now/soon”, theconditional random variables are computed using the state of thetransportation system at the time of the query, to provide more accuratedistributions of wait and ride durations.

In one embodiment, our method constructs routes given an arrivaldeadline. For example, consider the case when the rider wishes to arriveat the target before 9 AM on a Tuesday. This is equivalent to departurefrom the target at 9 AM, but going back in time and space. This can besimply abstracted through an appropriately reversed construction of anyof our graphs (buses and subways travel in reverse time and space).

In one embodiment, we determine prospect travel that meets a desiredprobability p of arrival before a deadline. When considering a prospectedge from c to c′, we use a random variable A denoting an arrival timeof the rider at c. Then, given the k random variables T₁, . . . , T_(k)of travel duration from c to c′ using choices, we determine adistribution of arrival time at c′ using the prospect travel, min(A+T₁,. . . , A+T_(k)). Then we determine up to which time t this distributionhas the mass that is the desired probability p.

In one embodiment, we report the vehicles along a shortest path, ortimes of arrival/departure for each point along the path. Thisinformation can be simply read off the path in the graph and the choicesof prospect edges along the path.

In one embodiment, we answer routing queries on computing devices withlimited storage and restricted communication with a backend server. Forexample, this can happen on a mobile phone for a user concerned aboutprivacy. In that case, we use an appropriately small number of clustersin graph G0. Similar techniques can be used in our other graphs.

In one embodiment, we impose requirements on a routing answer, includinga maximum walk duration, a maximum number of transfers, a maximum waitduration, a restriction to specific types of vehicles (e.g., use onlyexpress bus and subway). Our invention realizes these requirements by anappropriate modification of graphs and a shortest paths algorithm on thegraphs.

In one embodiment, our method is applied to an imperfect graph. Forexample, the weight of an edge WaitGetOn could inexactly reflect anexpected wait duration for a subway, perhaps because we estimated theduration incorrectly, or there could be vertices and edges for a busthat does not exist in the metropolitan area, perhaps because the busroute was just cancelled by the city government while our method was notyet able to notice the cancellation, or we sampled the expectation ofthe minimum of choices with a large error, or used an approximatemathematical formula/algorithm. These are just a few non-exhaustiveexamples of imperfectness. In any case, our method can still be applied.It will simply produce routes with some error.

In one embodiment, we remove unnecessary vertices and edges from agraph. For example, we collapse “pass through” vertices

SUBWAY_AVG_FROM_TO_s′_s″

in G0 by fusing the incoming edge and the outgoing edge.

In one embodiment, the steps of our method are applied in other order.For example, when constructing graph G0, we can reverse the orderdescribed in Sections 4.2.1 and 4.2.2: first add vertices and edges ofthe non-fixed timetable vehicles, and then add vertices and edges offixed timetable vehicles.

In one embodiment, we parallelize the method. For example, instead ofcomputing the prospect edges from each

PROSPECT_CLUSTER_SOURCE_c

in turn, we can consider any two c₁ and c₂, and compute the prospectedges from

PROSPECT_CLUSTER_SOURCE_c₁

in parallel with computing the prospect edges from

PROSPECT CLUSTER SOURCE c₂.

5 Computer System

One of the embodiments of the invention is a computer system thatanswers routing queries.

In one embodiment, the system answers queries for a shortest routebetween locations, given a departure time: any query is in the form(source, target, minuteOfDay). An answer is in the form of a route withdurations and choices. An illustration of the embodiment is in FIG. 13.

We use the term “module” in our description. It is known in the art thatthe term means a computer (sub)system that provides some specificfunctionality. Our choice of partitioning the computer system into thespecific modules is exemplary, not mandatory. Those of ordinary skill inthe art will notice that the system can be organized into modules inother manner without departing from the scope of the invention.

One module of the system (1202) reads information about the metropolitantransportation system from a plurality of data sources (1201). Themodule determines which vehicles, routes, or their parts, are considerfixed timetable, and which non-fixed timetable. The module computesroutes for fixed timetable vehicles. The module also computesdistributions of wait and ride durations conditioned on time fornon-fixed timetable vehicles.

The output is passed to a module (1204) that computes prospect edges.That module queries information about walks from a plurality of datasources (1203). For selected prospect clusters c and c′ and arrivaltimes of the rider at c, the module computes the weight P(c, c′) of theprospect edge and the choices, using random variables conditioned on therider arrival time at c. The results are stored in storage (1205).

The modules (1202) and (1204) operate continuously. As a result, thesystem maintains a fresh model of the transportation system.

In the meantime, other module (1206) pre-computes shortest paths. Themodule constructs graphs that link locations at times by readingprospect edges from (1205) and non-prospect edges from (1202). Shortestpaths algorithms are applied to the graphs to compute paths for selectedqueries in the form (stop/station cluster source, stop/station clustertarget, minuteOfDay). The results are stored, so that a result can belooked up from storage (1207) when needed later.

Concurrently, the query answering module (1208) answers queries. When aquery (source, target, minuteOfDay) arrives (1209), the module computesa shortest path following Section 4. The module contacts (1203) todetermine walks between the source and the target, and the stop/stationclusters. The module looks up relevant pre-computed shortest paths from(1207). When one is needed but not available yet, the module requests ashortest path from module (1206), and may store the resulting shortestpath in storage (1207) for future use. The module (1208) also looks upchoices and times from (1205). These walks, shortest paths and choicesare combined to generate an answer to the query (1210).

Aspects of the invention may take form of a hardware embodiment, asoftware embodiment, or a combination of the two. Steps of theinvention, including blocks of any flowchart, may be executed out oforder, partially concurrently or served from a cache, depending onfunctionality and optimization. Aspects may take form of a sequentialsystem, or parallel/distributed system, where each component embodiessome aspect, possibly redundantly with other components, and componentsmay communicate, for example using a network of any kind. A computerprogram carrying out operations for aspects of the invention may bewritten in any programming language, including C++, Java or JavaScript.Any program may execute on an arbitrary hardware platform, including aCentral Processing Unit (CPU), and a Graphics Processing Unit (GPU), andassociated memory and storage devices. A program may execute aspects ofthe invention on one or more software platforms, including, but notlimited to: a smartphone running Android or iOS operating systems, or aweb browser, including Firefox, Chrome, Internet Explorer, or Safari.

6 Computer Service Product

One of the embodiments of the invention is a service product availableto users through a user-facing device, such as a smartphone applicationor a webpage. It will be obvious to anyone of ordinary skill in the artthat the invention is not limited to these devices. It will also beobvious that the presentation of the service in our drawings can bemodified (including rearranging, resiting, changing colors, shape,adding or removing components) without departing from the scope of theinvention.

In one embodiment, the service is accessed though a smartphoneapplication. A user specifies a departure time, and a source and atarget, by interacting with the User Interface of the application on thesmartphone. The service then generates a route, and renders arepresentation of the route on the smartphone. FIG. 14 illustrates anexample result for a query from A to L departing at 8 AM.

In one embodiment, the service reports which choice yields a shortesttravel duration currently. In one embodiment, the system highlights thisfaster choice (illustrated by 1401 on the route), or shows the travelduration by the choice, or depicts a current wait duration (illustratedby 1402 near D). In one embodiment, this faster choice is computed giventhe current positions of the vehicles. In one embodiment, this report isrendered when the user is currently near the location of the choice; forexample, when the user is about to depart from A, the service may renderthat in the current conditions, it is faster to get to F via D and E,rather than via B and C.

In one embodiment, the service depicts a current wait duration for eachchoice from among the choices at a location (illustrated by 1403 nearF), or an expected ride duration for each choice (illustrated by 1404).This may help the user decide by themselves which choice to take, evenif not optimal.

In one embodiment, the service reports one expected wait duration forall the choices at a location. The duration is an expected wait durationassuming the user will board the choice that achieves an expectedminimum travel duration (illustrated by 1405 near H). In one embodiment,this report is rendered when vehicle positions are uncertain, forexample for a segment of the route far down the road compared to thecurrent position of the user. This informs the user how long they willidle at a stop/station waiting for a vehicle.

In one embodiment, the service reports a duration of prospect travelbetween two locations (illustrated by 1406 on the route). This is thevalue denoted P(c, c′) in Section 4.

In one embodiment, the service responds to the user with at least oneof:

-   1. the source location rendered on a map;-   2. the target location rendered on a map;-   3. a location of any stop along a route rendered on a map;-   4. a sequence of locations along a route rendered on a map;-   5. a name, an address, or an identifier of any of: the source    location, the target location, or any stop along a route;-   6. a departure time;-   7. a departure time range;-   8. an arrival time;-   9. an arrival time range;-   10. a probability of arriving before a deadline;-   11. a sequence of locations along two or more choices that travel    between two locations rendered on a map;-   12. directions for a walk component in any choice;-   13. a location or a duration of a wait component in any choice;-   14. directions for a ride component in any choice;-   15. an expected minimum wait duration among at least two choices;-   16. a current minimum wait duration among at least two choices;-   17. an expected travel duration for any component of a choice, or a    choice; or an expected minimum travel duration among at least two    choices;-   18. a current travel duration for any component in a choice, or a    choice; or a minimum travel duration among at least two choices;-   19. an expected departure time or an expected arrival time for: any    component in a choice, a choice, or a minimum among at least two    choices;-   20. a current departure time or a current arrival time for : any    component in a choice, a choice, or a minimum among at least two    choices;-   21. a name or an identifier of any vehicle in any choice;-   22. a name, an address, or an identifier of any stop of any vehicle    in any choice;-   23. a current location of any vehicle in any choice; or-   24. a rendering of which choice, from among two or more choices, is    fastest given current locations of vehicles.

7 Claims

Those skilled in the art shall notice that various modifications may bemade, and substitutions may be made with essentially equivalents,without departing from the scope of the present invention. Besides, aspecific situation may be adapted to the teachings of the inventionwithout departing from its scope. Therefore, despite the fact that theinvention has been described with reference to the disclosedembodiments, the invention shall not be restricted to these embodiments.Rather, the invention will include all embodiments that fall within thescope of the appended claims.

1. A method for providing a route or a route duration for a journey froma source location to a target location, the method comprising: (a)receiving a request comprising the source location and the targetlocation; (b) determining two or more travel paths from the sourcelocation to the target location; (c) determining a travel duration foreach of the travel paths, wherein the travel duration is defined as amathematical random variable that is non-trivial; (d) generating a routeor a route duration using a mathematical random variable M that is aminimum of the travel duration mathematical random variables, whereinthe using comprises at least one of: i. using an expected value of themathematical random variable M, or ii. using a probability of arrivaltime Pr [T+M≤A] for at least one threshold T on a departure time and atleast one threshold A on an arrival time; and (e) responding to therequest with information comprising the route or the route duration. 2.The method of claim 1, wherein the request further comprises a time ofdeparture from the source location.
 3. The method of claim 1, wherein atleast one of the travel paths includes at least one ride by a vehicle.4. The method of claim 3, wherein the vehicle follows a non-fixedtimetable.
 5. The method of claim 3, wherein the route is constrained byat least one of: (a) a vehicle type; (b) a vehicle stop type; or (c) athreshold on the number of vehicle transfers.
 6. The method of claim 3,wherein a ride duration of the vehicle is a mathematical random variableconditioned on a departure time from a location where the vehicle isboarded.
 7. The method of claim 1, wherein at least one of the travelpaths includes at least one wait for a vehicle.
 8. The method of claim7, wherein the route is constrained by a threshold on a wait duration.9. The method of claim 7, wherein a wait duration for the vehicle is amathematical random variable conditioned on an arrival time at alocation where the vehicle is boarded.
 10. The method of claim 1,wherein at least one of the travel paths includes at least one walk. 11.The method of claim 10, wherein the route is constrained by a thresholdon a walk duration.
 12. The method of claim 1, wherein a probabilitydistribution of at least one of the travel duration mathematical randomvariables is determined from at least one of: (a) historical data aboutan arrival or a departure time of a vehicle from a stop; (b) historicaldata about a duration of travel of a vehicle between stops; (c) passinginterval of a vehicle through a stop; or (d) current geographic locationof a vehicle.
 13. The method of claim 1, wherein at least one of thetravel duration mathematical random variables is conditioned on anarrival time at the source location.
 14. The method of claim 1, whereinat least one of the travel duration mathematical random variables isuniformly distributed on an interval between a minimum travel durationand a maximum travel duration.
 15. The method of claim 1, wherein atleast one of the travel duration mathematical random variables isconditioned on a source location arrival time that falls within aspecific time window.
 16. The method of claim 1, wherein portions of twoor more of the travel paths are overlapping.
 17. The method of claim 1,wherein the using an expected value of the mathematical random variableM comprises at least one of: (a) sampling from a distribution of themathematical random variable M; (b) evaluating a mathematical formulafor an expected value of the mathematical random variable M; (c)computing an approximate integral over a distribution of themathematical random variable M; or (d) executing an approximationalgorithm for an expected value of the mathematical random variable M.18. The method of claim 1, wherein the generating a route or a routeduration comprises: (a) determining two or more first type travelduration mathematical random variables that are correlated; (b)determining one or more second type travel duration mathematical randomvariables that are independent; and (c) computing an expected minimum of: one first type random variable and all second type random variables.19. The method of claim 1, wherein the route is constrained by at leastone of: (a) a type of object being routed; or (b) a threshold on themonetary cost of travel.
 20. The method of claim 1, wherein the requestfurther comprises: (a) an arrival deadline, and a desired probability ofarriving at the target location before the arrival deadline; wherein theusing a probability of arrival time Pr[T+M≤A] for at least one thresholdT on a departure time and at least one threshold A on an arrival timecomprises: (b) setting the threshold A to the arrival deadline, anddetermining a threshold T, that is the departure time from the sourcelocation, such that the probability Pr[T+M≤A] is equal to the desiredprobability of arriving at the target location before the arrivaldeadline.
 21. The method of claim 1, further comprising: before thereceiving a request, (a) pre-computing at least one of the followingitems: i. a travel duration mathematical random variable for a travelpath; ii. an expected minimum of at least two travel durationmathematical random variables; iii. a probability distribution of aminimum of at least two travel duration mathematical random variables;or iv. a route or a route duration between a pair of locations; and (b)storing the pre-computed item in a database; wherein the generating aroute or a route duration comprises: (c) retrieving from the databasethe pre-computed item.
 22. The method of claim 3, wherein thedetermining of two or more travel paths comprises: (a) determining atleast one vehicle stop location within a threshold distance from thesource location, and at least one vehicle stop location within thethreshold distance from the target location, thereby generating twolists of vehicle stops near the source and target locations; wherein thegenerating a route or a route duration comprises: (b) computing theroute duration using at least one travel duration mathematical randomvariable of at least one pair of vehicle stops from the lists; and (c)determining walk durations between the vehicle stops and the source andthe target locations.
 23. A method for providing a route or a routeduration for a journey from a source location to a target location, themethod comprising: (a) receiving information about a plurality of stopsof a vehicle and a vehicle travel time information, for a plurality ofvehicles; (b) creating a graph comprising a plurality of graph verticesand a plurality of graph edges, including at least two graph verticesthat represent vehicle stops and at least two graph edges that representvehicle travel durations; (c) creating at least one graph prospect edgefrom an origin vertex to a destination vertex, each prospect edgerepresenting a travel duration, and comprising: i. determining two ormore travel paths from the location of the origin vertex of the graphprospect edge to the location of the destination vertex of the graphprospect edge; ii. determining a travel duration for each of the travelpaths, wherein the travel duration is defined as a mathematical randomvariable that is non-trivial; and iii. computing a graph prospect edgetravel duration using a mathematical random variable M that is a minimumof the travel duration mathematical random variables, wherein the usingcomprises at least one of: A. using an expected value of themathematical random variable M, or B. using a probability of arrivaltime Pr[T+M≤A] for at least one threshold T on a departure time and atleast one threshold A on an arrival time; (d) receiving at least onerequest for a route or a route duration from a source location to atarget location; (e) generating a route or a route duration using atleast one graph path between arbitrary two vertices, wherein the atleast one graph path includes the graph prospect edge; and (f)responding to the request with information comprising the route or theroute duration.
 24. The method of claim 23, wherein (a) at least onevehicle of the plurality of vehicles follows a non-fixed timetable; and(b) the plurality of graph edges includes at least one [RideSame] graphedge representing a travel duration between two stops of the non-fixedtimetable vehicle.
 25. The method of claim 24, wherein the [RideSame]graph edge represents an average travel duration during a specific timewindow.
 26. The method of claim 23, wherein (a) at least one vehicle ofthe plurality of vehicles follows a fixed timetable; and (b) theplurality of graph edges includes at least one [RideManyGetOff] graphedge representing a travel duration between two stops of at least onefixed timetable vehicle.
 27. The method of claim 23, wherein theplurality of graph edges includes at least one [WaitGetOn] graph edgerepresenting a wait duration for a vehicle before boarding the vehicleat a stop.
 28. The method of claim 27, wherein the [WaitGetOn] graphedge represents a wait duration equal to half of an averageinter-arrival time of a vehicle at a stop during a specific time window.29. The method of claim 23, wherein the plurality of graph edgesincludes at least one [Walk] graph edge representing a walk durationbetween vertex locations.
 30. The method of claim 23, wherein theplurality of graph edges includes at least one of: (a) a [GetOff] graphedge representing getting off from a vehicle onto a stop; (b) a[FirstWaitGetOn] graph edge representing boarding a vehicle withoutwaiting; or (c) a [Zero] graph edge representing a travel betweenvertices that lasts less than a threshold duration.
 31. The method ofclaim 23, wherein (a) the plurality of graph vertices includes at leastone vertex representing a location other than any vehicle stop; and (b)the plurality of graph edges includes at least one [Walk] graph edgerepresenting a walk duration between the vertex other than any vehiclestop and any other graph vertex.
 32. The method of claim 23, wherein (a)the plurality of graph vertices includes a cluster vertex representingat least two graph vertices clustered based on a geographical proximity;and (b) the plurality of graph edges includes at least one edgerepresenting a travel duration between the cluster vertex and any othergraph vertex.
 33. The method of claim 23, wherein the creating at leastone graph prospect edge comprises creating a graph prospect edge to eachof one or more destination vertices from an origin vertex comprising:(a) traversing the graph forward from the origin vertex; (b) creating aplurality of graph paths that end at any of the destination vertices;and (c) identifying the graph paths that lead to a destination vertex,for each of the destination vertices.
 34. The method of claim 23,wherein the creating at least one graph prospect edge comprises creatinga graph prospect edge from each of one or more origin vertices to adestination vertex comprising: (a) traversing the graph backward fromthe destination vertex; (b) creating a plurality of graph paths thatbegin at any of the origin vertices; and (c) identifying the graph pathsthat lead from an origin vertex, for each of the origin vertices. 35.The method of claim 23, wherein at least one of the travel pathsincludes a travel by two or more vehicles or by two or more walks. 36.The method of claim 23, wherein the creating at least one graph prospectedge is performed with a condition that a graph prospect edge for thetwo or more travel paths is not created when the k≥2 travel durationmathematical random variables T₁, . . . , T_(k) satisfy a condition thata minimum of expected values min_(1≤i≤k) E [T_(i)] is within a thresholdfrom a value of expected minimum E [min_(1≤i≤k) T_(i)].
 37. The methodof claim 23, wherein the generating a route or a route durationcomprises applying a Dijkstra's shortest paths algorithm or an A* (Astar) search algorithm to the graph.
 38. The method of claim 23, whereinthe request further comprises a time of departure from the sourcelocation.
 39. The method of claim 23, wherein at least one of the travelpaths includes at least one ride by a vehicle.
 40. The method of claim39, wherein the vehicle follows a non-fixed timetable.
 41. The method ofclaim 39, wherein the route is constrained by at least one of: (a) avehicle type; (b) a vehicle stop type; or (c) a threshold on the numberof vehicle transfers.
 42. The method of claim 39, wherein a rideduration of the vehicle is a mathematical random variable conditioned ona departure time from a location where the vehicle is boarded.
 43. Themethod of claim 23, wherein at least one of the travel paths includes atleast one wait for a vehicle.
 44. The method of claim 43, wherein theroute is constrained by a threshold on a wait duration.
 45. The methodof claim 43, wherein a wait duration for the vehicle is a mathematicalrandom variable conditioned on a probability distribution of arrivaltime at a location where the vehicle is boarded.
 46. The method of claim23, wherein at least one of the travel paths includes at least one walk.47. The method of claim 46, wherein the route is constrained by athreshold on a walk duration.
 48. The method of claim 23, wherein aprobability distribution of at least one of the travel durationmathematical random variables is determined from at least one of: (a)historical data about an arrival or a departure time of a vehicle from astop; (b) historical data about a duration of travel of a vehiclebetween stops; (c) passing interval of a vehicle through a stop; or (d)current geographic location of a vehicle.
 49. The method of claim 23,wherein for at least one graph prospect edge, at least one of the travelduration mathematical random variables is conditioned on a probabilitydistribution of arrival time at a location of the origin vertex of theprospect edge.
 50. The method of claim 23, wherein at least one of thetravel duration mathematical random variables is uniformly distributedon an interval between a minimum travel duration and a maximum travelduration.
 51. The method of claim 23, wherein for at least one graphprospect edge, at least one of the travel duration mathematical randomvariables is conditioned on an arrival time at a location of the originvertex of the prospect edge that falls within a specific time window.52. The method of claim 23, wherein portions of two or more of thetravel paths are overlapping.
 53. The method of claim 23, wherein theusing an expected value of the mathematical random variable M comprisesat least one of: (a) sampling from a distribution of the mathematicalrandom variable M; (b) evaluating a mathematical formula for an expectedvalue of the mathematical random variable M; (c) computing anapproximate integral over a distribution of the mathematical randomvariable M; or (d) executing an approximation algorithm for an expectedvalue of the mathematical random variable M.
 54. The method of claim 23,wherein the computing a graph prospect edge travel duration comprises:(a) determining two or more first type travel duration mathematicalrandom variables that are correlated; (b) determining one or more secondtype travel duration mathematical random variables that are independent;and (c) computing an expected minimum of : one first type randomvariable and all second type random variables.
 55. The method of claim23, wherein the route is constrained by at least one of: (a) a type ofobject being routed; or (b) a threshold on the monetary cost of travel.56. The method of claim 23, wherein the request further comprises: (a)an arrival deadline, and a desired probability of arriving at the targetlocation before the arrival deadline; wherein the using a probability ofarrival time Pr[T+M≤A] for at least one threshold T on a departure timeand at least one threshold A on an arrival time comprises: (b) settingthe threshold A to the arrival deadline, and determining a threshold T,that is a mathematical random variable of the departure time from thelocation of the origin vertex of the graph prospect edge, such that theprobability Pr[T+M≤A] is equal to the desired probability of arriving atthe target location before the arrival deadline.
 57. The method of claim23, further comprising: before the receiving at least one request, (a)pre-computing at least one of the following items: i. a travel durationmathematical random variable between a pair of vertices; ii. an expectedminimum of at least two travel duration mathematical random variables;iii. a probability distribution of a minimum of at least two travelduration mathematical random variables; or iv. a graph path or a travelduration between a pair of vertices; and (b) storing the pre-computeditem in a database; wherein the generating a route or a route durationcomprises: (c) retrieving from the database the pre-computed item. 58.The method of claim 23, further comprising: (a) before the receiving atleast one request, pre-computing a route or a route duration for atleast one pair of vertices, and storing the pre-computed route or thepre-computed route duration in a database, wherein the generating aroute or a route duration comprises: (b) determining at least one vertexwhose location is within a threshold distance from the source location,and at least one vertex whose location is within a threshold distancefrom the target location, thereby generating two lists of vertices nearthe source and target locations; and (c) for at least one pairwisecombination of vertices on the two lists, retrieving from the databaseat least one route or route duration.
 59. The method of claim 23,wherein the generating a route or a route duration comprises: (a)determining at least one initial part of travel involving travel fromthe source location to a second vehicle stop, wherein the initial partof travel is determined by: i. generating two or more travel paths fromthe source location, each travel path including at least one vehicleride from a first vehicle stop that is within a threshold distance fromthe source location to the second vehicle stop, where the first vehiclestop is an arbitrary stop of any vehicle, and the second vehicle stop isan arbitrary stop of any vehicle; and ii. determining a travel durationfor each of the travel paths, wherein the travel duration is defined asa mathematical random variable; and (b) computing a duration of at leastone initial part of travel using a mathematical random variable that isa minimum of the travel duration mathematical random variables.
 60. Themethod of claim 23, wherein the generating a route or a route durationcomprises: (a) determining at least one final part of travel involvingtravel from a penultimate vehicle stop to the target location, whereinthe final part of travel is determined by: i. generating two or moretravel paths to the target location, each travel path including at leastone vehicle ride from the penultimate vehicle stop to a last vehiclestop that is within a threshold distance from the target location, wherethe penultimate vehicle stop is an arbitrary stop of any vehicle, andthe last vehicle stop is an arbitrary stop of any vehicle; and ii.determining a travel duration for each of the travel paths, wherein thetravel duration is defined as a mathematical random variable; and (b)computing a duration of at least one final part of travel using amathematical random variable that is a minimum of the travel durationmathematical random variables.
 61. A computer system for providing aroute or a route duration for a journey from a source location to atarget location, the computer system comprising: (a) one or moreprocessors; (b) memory storing one or more programs for execution by oneor more processors; and (c) the one or more programs comprisinginstructions to be executed by the one or more processors so as toperform steps comprising: i. receiving a request comprising the sourcelocation and the target location; ii. determining two or more travelpaths from the source location to the target location; iii. determininga travel duration for each of the travel paths, wherein the travelduration is defined as a mathematical random variable that isnon-trivial; iv. generating a route or a route duration using amathematical random variable M that is a minimum of the travel durationmathematical random variables, wherein the using comprises at least oneof: A. using an expected value of the mathematical random variable M, orB. using a probability of arrival time Pr[T+M≤A] for at least onethreshold T on a departure time and at least one threshold A on anarrival time; and v. responding to the request with informationcomprising the route or the route duration.
 62. The computer system ofclaim 61, wherein the information comprising the route or the routeduration further comprises at least one of: (a) the source locationrendered on a map; (b) the target location rendered on a map; (c) alocation of any stop along a route rendered on a map; (d) a sequence oflocations along a route rendered on a map; (e) a name, an address, or anidentifier of any of: the source location, the target location, or anystop along a route; (f) a departure time; (g) a departure time range;(h) an arrival time; (i) an arrival time range; (j) a probability ofarriving before a deadline; (k) a sequence of locations along two ormore travel paths between two locations rendered on a map; (l)directions for a walk component in any travel path; (m) a location or aduration of a wait component in any travel path; (n) directions for aride component in any travel path; (o) an expected minimum wait durationamong at least two travel paths; (p) a current minimum wait durationamong at least two travel paths; (q) an expected travel duration for anycomponent of a travel path, or a travel path; or an expected minimumtravel duration among at least two travel paths; (r) a current travelduration for any component in a travel path, or a travel path; or aminimum travel duration among at least two travel paths; (s) an expecteddeparture time or an expected arrival time for : any component in atravel path, a travel path, or a minimum among at least two travelpaths; (t) a current departure time or a current arrival time for : anycomponent in a travel path, a travel path, or a minimum among at leasttwo travel paths; (u) a name or an identifier of any vehicle in anytravel path; (v) a name, an address, or an identifier of any stop of anyvehicle in any travel path; (w) a current location of any vehicle in anytravel path; or (x) a rendering of which travel path, from among two ormore travel paths, is fastest given current locations of vehicles.
 63. Acomputer system for providing a route or a route duration for a journeyfrom a source location to a target location, the computer systemcomprising: (a) one or more processors; (b) memory storing one or moreprograms for execution by one or more processors; and (c) the one ormore programs comprising instructions to be executed by the one or moreprocessors so as to perform steps comprising: i. receiving informationabout a plurality of stops of a vehicle and a vehicle travel timeinformation, for a plurality of vehicles; ii. creating a graphcomprising a plurality of graph vertices and a plurality of graph edges,including at least two graph vertices that represent vehicle stops andat least two graph edges that represent vehicle travel durations; iii.creating at least one graph prospect edge from an origin vertex to adestination vertex, each prospect edge representing a travel duration,and comprising: A. determining two or more travel paths from thelocation of the origin vertex of the graph prospect edge to the locationof the destination vertex of the graph prospect edge; B. determining atravel duration for each of the travel paths, wherein the travelduration is defined as a mathematical random variable that isnon-trivial; and C. computing a graph prospect edge travel durationusing a mathematical random variable M that is a minimum of the travelduration mathematical random variables, wherein the using comprises atleast one of: using an expected value of the mathematical randomvariable M, or using a probability of arrival time Pr[T+M≤A] for atleast one threshold T on a departure time and at least one threshold Aon an arrival time; iv. receiving at least one request for a route or aroute duration from a source location to a target location; v.generating a route or a route duration using at least one graph pathbetween arbitrary two vertices, wherein the at least one graph pathincludes the graph prospect edge; and vi. responding to the request withinformation comprising the route or the route duration.
 64. The computersystem of claim 63, wherein the information comprising the route or theroute duration further comprises at least one of: (a) the sourcelocation rendered on a map; (b) the target location rendered on a map;(c) a location of any stop along a route rendered on a map; (d) asequence of locations along a route rendered on a map; (e) a name, anaddress, or an identifier of any of: the source location, the targetlocation, or any stop along a route; (f) a departure time; (g) adeparture time range; (h) an arrival time; (i) an arrival time range;(j) a probability of arriving before a deadline; (k) a sequence oflocations along two or more travel paths between two locations renderedon a map; (l) directions for a walk component in any travel path; (m) alocation or a duration of a wait component in any travel path; (n)directions for a ride component in any travel path; (o) an expectedminimum wait duration among at least two travel paths; (p) a currentminimum wait duration among at least two travel paths; (q) an expectedtravel duration for any component of a travel path, or a travel path; oran expected minimum travel duration among at least two travel paths; (r)a current travel duration for any component in a travel path, or atravel path; or a minimum travel duration among at least two travelpaths; (s) an expected departure time or an expected arrival time for :any component in a travel path, a travel path, or a minimum among atleast two travel paths; (t) a current departure time or a currentarrival time for : any component in a travel path, a travel path, or aminimum among at least two travel paths; (u) a name or an identifier ofany vehicle in any travel path; (v) a name, an address, or an identifierof any stop of any vehicle in any travel path; (w) a current location ofany vehicle in any travel path; or (x) a rendering of which travel path,from among two or more travel paths, is fastest given current locationsof vehicles.